package com.daocao.yfb.api;

import io.reactivex.Observable;

import com.daocao.yfb.api.bean.CheckCodeBean;
import com.daocao.yfb.api.bean.CodeBean;
import com.daocao.yfb.api.bean.IdBean;
import com.daocao.yfb.api.bean.InitAppBean;
import com.daocao.yfb.api.bean.JPushBean;
import com.daocao.yfb.api.bean.LoginBySmsBean;
import com.daocao.yfb.api.bean.LoginRegisterBean;
import com.daocao.yfb.api.bean.ModifyChangePhoneBean;
import com.daocao.yfb.api.bean.ModifyPhoneCodeBean;
import com.daocao.yfb.api.bean.ModifyPhoneCodeCheckBean;
import com.daocao.yfb.api.bean.NickNameBean;
import com.daocao.yfb.api.bean.NoticeIndexBean;
import com.daocao.yfb.api.bean.NoticeListBean;
import com.daocao.yfb.api.bean.OrderDetailBean;
import com.daocao.yfb.api.bean.OrderEditBean;
import com.daocao.yfb.api.bean.PageBean;
import com.daocao.yfb.api.bean.RelateAddBean;
import com.daocao.yfb.api.bean.RelateDeleteBean;
import com.daocao.yfb.api.bean.ResetPassBean;
import com.daocao.yfb.api.bean.UpdateAccountBean;
import com.daocao.yfb.api.bean.UploadHeadBean;
import com.daocao.yfb.api.model.CheckCodeModel;
import com.daocao.yfb.api.model.GoodsBuyBean;
import com.daocao.yfb.api.model.GoodsBuyModel;
import com.daocao.yfb.api.model.IndexModel;
import com.daocao.yfb.api.model.InitAppModel;
import com.daocao.yfb.api.model.LoginByPwdModel;
import com.daocao.yfb.api.model.ModifyCodeCheckModel;
import com.daocao.yfb.api.model.NoticeIndexModel;
import com.daocao.yfb.api.model.NoticeListModel;
import com.daocao.yfb.api.model.OrderDetailModel;
import com.daocao.yfb.api.model.OrderListModel;
import com.daocao.yfb.api.model.PayWayModel;
import com.daocao.yfb.api.model.PointDetailModel;
import com.daocao.yfb.api.model.RelateListModel;
import com.daocao.yfb.api.model.UploadHeadModel;
import com.daocao.yfb.api.model.UserInfoModel;

import retrofit2.http.Body;
import retrofit2.http.POST;

/**
 * Created by xsooy-pc on 2017/8/24.
 */

public interface ApiService {
    //1、初始化
    @POST("init")
    Observable<InitAppModel> getInitInfo(@Body InitAppBean item);

    @POST("index")
    Observable<IndexModel> getIndex();

    @POST("goods/detail")
    Observable<PointDetailModel> getPointDetail(@Body IdBean item);

    @POST("user/logout")
    Observable<ResponseModel> getLogout();

    @POST("register/user")
    Observable<ResponseModel> getRegister(@Body LoginRegisterBean item);

    //    3.2、登录
//    1、通过账号密码登录
    @POST("user/login/pwd")
    Observable<LoginByPwdModel> getLoginByPwd(@Body LoginRegisterBean item);

    //    1、通过手机验证码登录
    @POST("user/login/sms")
    Observable<LoginByPwdModel> getLoginBySms(@Body LoginBySmsBean item);


    //4.1、我的订单
    @POST("order/lists")
    Observable<OrderListModel> getOrderList(@Body PageBean item);

    //4.2、修改收货账号
    @POST("order/update-account")
    Observable<ResponseModel> getUpdateAccount(@Body UpdateAccountBean item);

    //4.3、订单详情
    @POST("order/detail")
    Observable<OrderDetailModel> getOrderDetail(@Body OrderDetailBean item);

    //4.4、修改密码
    @POST("user/reset-password")
    Observable<ResponseModel> getResetPass(@Body ResetPassBean item);

    //   3.5.1、通过原手机号修改
    @POST("modify-phone/sendcode")
    Observable<ResponseModel> getModifyCode(@Body ModifyPhoneCodeBean item);

    //   3.5.2、验证原手机号码验证码
    @POST("modify-phone/checkcode")
    Observable<ModifyCodeCheckModel> getModifyCodeCheck(@Body ModifyPhoneCodeCheckBean item);

    //   3.5.3、修改手机号码
    @POST("modify-phone/change-phone")
    Observable<ResponseModel> getModifyChangePhone(@Body ModifyChangePhoneBean item);


    @POST("payment/payway")
    Observable<PayWayModel> getPayWay();

    //    4.0、用户信息
    @POST("user/info")
    Observable<UserInfoModel> getUserInfo();

    //    4.6、修改昵称
    @POST("user/reset-nickname")
    Observable<ResponseModel> getNickName(@Body NickNameBean bean);

    //    4.7、修改头像
    @POST("user/reset-icon")
    Observable<UploadHeadModel> getUploadHead(@Body UploadHeadBean bean);

    //5.2、关联账号列表
    @POST("relate/lists")
    Observable<RelateListModel> getRelateLists();

    //    5.1、添加关联账号
    @POST("relate/add")
    Observable<ResponseModel> getRelateAdd(@Body RelateAddBean bean);

    //   5.3、删除关联账号
    @POST("relate/delete")
    Observable<ResponseModel> getRelateDelete(@Body RelateDeleteBean bean);

    @POST("goods/buy")
    Observable<GoodsBuyModel> getGoodsBuy(@Body GoodsBuyBean bean);

    @POST("order/edit")
    Observable<GoodsBuyModel> getOrderEdit(@Body OrderEditBean bean);

    //   8.1、发送短信验证码
    @POST("sms/send")
    Observable<ResponseModel> getCode(@Body CodeBean item);


    //  8.2、验证验证码
    @POST("sms/check-code")
    Observable<CheckCodeModel> getCheckCode(@Body CheckCodeBean item);

    //  9.1、消息首页
    @POST("notice/index")
    Observable<NoticeIndexModel> getNoticeIndex();

    //  9.2、消息列表
    @POST("notice/list")
    Observable<NoticeListModel> getNoticeList(@Body NoticeListBean item);

    //17、绑定极光id
    @POST("/jiguang/indexd")
    Observable<ResponseModel> getJPush(@Body JPushBean item);
}
